<?php

use yii\db\Migration;

/**
 * Handles the creation of table `property`.
 */
class m171123_015256_create_property_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('{{%property}}', [
            'id' => $this->primaryKey(),
            'thumbs' => $this->string(),
            'title' => $this->string()->notNull(),
            'content' => $this->text(),
            'open_at' => $this->integer(10)->notNull(),
            'created_at' => $this->integer(10)->notNull(),
            'updated_at' => $this->integer(10)->notNull(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('{{%property}}');
    }
}
